package com.miku.blog.controller;

import com.miku.blog.annotation.SystemLog;
import com.miku.blog.domain.pojo.ResponseResult;
import com.miku.blog.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @create ${}YEAR-06-10 3:44
 */
@Api(tags = "Blog[文章分类]")
@RestController
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @SystemLog(notes = "获取分类列表{前台博客系统}")
    @ApiOperation(value = "获取分类列表接口",notes = "获取分类列表 分页展示")
    @GetMapping("/categories")
    public ResponseResult getCategories(@RequestParam("current") Integer current)
    {
        return categoryService.getCategories(current);
    }


}
